import request from '@/utils/request'

// 查询题库列表
export function listQuestionBankType(query) {
  return request({
    url: '/topic/QuestionBankType/list',
    method: 'get',
    params: query
  })
}

// 查询题库详细
export function getQuestionBankType(id) {
  return request({
    url: '/topic/QuestionBankType/' + id,
    method: 'get'
  })
}

// 新增题库
export function addQuestionBankType(data) {
  return request({
    url: '/topic/QuestionBankType',
    method: 'post',
    data: data
  })
}

// 修改题库
export function updateQuestionBankType(data) {
  return request({
    url: '/topic/QuestionBankType/update',
    method: 'post',
    data: data
  })
}

// 删除题库
export function delQuestionBankType(id) {
  return request({
    url: '/topic/QuestionBankType/delete/' + id,
    method: 'post'
  })
}

// 导出题库
export function exportQuestionBankType(query) {
  return request({
    url: '/topic/QuestionBankType/export',
    method: 'get',
    params: query
  })
}

//  课程开课单位树 数据
export function getQueryCourseTree() {
  return request({
    url: '/org/course/queryCourseTree',
    method: 'get',
  })
}
